<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="static/css/reset.css">
    <link rel="stylesheet" href="static/css/base.css">
    <link rel="stylesheet" href="static/css/index.css">
    <title>活动首页</title>
</head>
<body>

    <script src="static/js/jquery.min.js"></script>
    <script src="static/js/rem.js"></script>
    <script src="static/js/base.js"></script>
	<script>
        $(function(){
            var code = getQueryString("code");
            // localStorage.setItem("code",code);
            $.ajax({
                url: baseUrl + "/rest/tenPayController/authv5?CODE="+code+"&appCode=fxjpay",
                type: 'GET',
                dataType:'json',
                success:function (e) {
                    console.log(e);
                    var openId = localStorage.getItem("openId");
                    if(!openId){
                        localStorage.setItem("openId",e.data.openid);
                    }
                    localStorage.setItem("openId",e.data.openid);
                    localStorage.setItem("wxInfo",JSON.stringify(e.data));
                    var openId = localStorage.getItem("openId");
                    console.log(openId)
                    // location.href = "index.html";
                    location.href = "index.html?openId="+openId;
                    // localStorage.setItem("openId","ojV4hv0b-zEMPXYjaE8kKR_ipVas");
                    // location.href = "index.html?openId=ojV4hv0b-zEMPXYjaE8kKR_ipVas";
                }		 
            });
        });
    </script>
</body>
</html>